/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 *
 * @author sunwei
 */
@Entity (name= "BomRawMaterialWeight")
public class BomRawMaterialWeightEntity extends DataObjectEntity implements Serializable {
    @ManyToOne
    private RawMaterialEntity rawMaterial;
    private double bomWeight; // weight of the raw materail inside the bom
    
    
    public BomRawMaterialWeightEntity() {
        super();
    }
    
    public BomRawMaterialWeightEntity(RawMaterialEntity rawMaterial, double bomWeight){
        this.rawMaterial = rawMaterial;
        this.bomWeight = bomWeight;
    }

    public RawMaterialEntity getRawMaterial(){
        return rawMaterial;
    }

    public void setRawMaterial(RawMaterialEntity rawMaterial){
        this.rawMaterial = rawMaterial;
    }
    
    public double getBomWeight(){
        return bomWeight;
    }
    
    public void setBomWeight(double weight){
        bomWeight = weight;
    }
    

    @Override
    public String childToString() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
